# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Alexey Andreyev <aa13q@ya.ru>
# Contributor Sefa Eyeoglu <contact@scrumplex.net>

pkgname=libquotient
pkgver=0.8.1.2
pkgrel=1
pkgdesc='A Qt library to write cross-platform clients for Matrix'
license=(LGPL)
arch=(loong64 x86_64)
url='https://matrix.org/docs/projects/sdk/quotient'
depends=(qt5-multimedia qtkeychain-qt5 libolm)
makedepends=(cmake)
source=(https://github.com/quotient-im/libQuotient/archive/$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('5e5539fe9616c9f63985b0aabfab1858f1626e3d71a14709eeedd85af0471c7c')

build() {
  cmake -B build -S libQuotient-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=None \
    -DBUILD_SHARED_LIBS=ON \
    -DQuotient_ENABLE_E2EE=ON
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
